home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 8
/
Night Owl CD-ROM (NOPV8) (Night Owl Publisher) (1993).ISO
/
034a
/
aecur101.arj
/
CONTRIB
/
CURSES
/
SRC
/
KBGETC.C
< prev
next >
Wrap
C/C++ Source or Header
|
1990-03-08
|
602b
|
34 lines
/*----------------------------------------------------------------------
*
* kbgetc.c
*
* copyright (c) 1987,88,89,90 J. Alan Eldridge
*
* this is the non-tasking keyboard handler for Curses
*
*----------------------------------------------------------------------
*/
#include "curses.h"
/*
kbgetc()
get next character available from keyboard
if key is ctl-backslash, cleanup and exit (panic)
*/
int
kbgetc()
{
int c = _kb_getc();
if (c == K_CTL_BKSLASH) {
endwin();
exit(1);
}
return c;
}